//
//  WithdrawSuccessCell.m
//  HTHappySale
//
//  Created by 创维海通 on 2017/9/26.
//  Copyright © 2017年 zxyywy. All rights reserved.
//

#import "WithdrawSuccessCell.h"
#import "MeHTModel.h"

@interface WithdrawSuccessCell ()
@property (strong, nonatomic) IBOutlet UILabel *priceLabel;
@property (strong, nonatomic) IBOutlet UILabel *dateLabel;

- (IBAction)skipController:(id)sender;
@end

@implementation WithdrawSuccessCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configureCell:(MeWithdrawSuccessModel *)model
{
    NSString *moneyStr =[NSString stringWithFormat:@"%.2f元",model.amount];
    NSInteger len = [moneyStr length];
    NSMutableAttributedString *str = [[NSMutableAttributedString alloc]initWithString:moneyStr];
    
    [str addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, len-1)];
    _priceLabel.attributedText = str;
    _dateLabel.text = [NSString stringWithFormat:@"预计%@个工作日内到账",model.weekday];
}

- (IBAction)skipController:(id)sender {
    if ([_suceessDeleate respondsToSelector:@selector(goBackController)]) {
        [_suceessDeleate performSelector:@selector(goBackController) withObject:self];
    }
}
@end
